import dayjs from "dayjs";

export default (app) => {
  app.use(async (ctx, next) => {
    const start = new Date()
    await next()
    const ms = new Date() - start
    console.log(`${ctx.url}  ${ms}ms - [ ${dayjs(start).format('YYYY-MM-DD HH:mm:ss')} ]`)
  })
}